package com.whmskj.xjlhsc.service;

import com.whmskj.xjlhsc.controller.fo.TaskStatisticsFo;
import com.whmskj.xjlhsc.entity.WbRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.whmskj.xjlhsc.mobie.equipment.controller.fo.ApproveListFo;
import com.whmskj.xjlhsc.mobie.equipment.controller.fo.RepairTaskListFo;
import com.whmskj.xjlhsc.mobie.equipment.dto.ApproveDto;
import com.whmskj.xjlhsc.service.dto.RepairTaskDto;
import com.whmskj.xjlhsc.service.dto.TaskStatisticsDto;

import java.util.List;

/**
 * @author lk
 * @since 2025-06-16 13:31:13
 */
public interface WbRecordService extends IService<WbRecord> {

    Page<WbRecord> findPage(WbRecord params);

    List<WbRecord> findList(WbRecord params);

    WbRecord findById(Long id);

    boolean insert(WbRecord wbRecord);

    boolean update(WbRecord wbRecord);

    int delete(Long id);

    /**
     * 维保统计
     *
     * @param fo
     * @return
     */
    TaskStatisticsDto taskStatistics(TaskStatisticsFo fo);

    /**
     * 维保检修
     *
     * @param fo
     * @return
     */
    List<RepairTaskDto> getRepairTaskList(RepairTaskListFo fo);

    /**
     * 扫码判断维保任务是否是当前扫描机台 | 返回维保任务详情信息
     *
     * @param recordId
     * @param deviceId
     * @return
     */
    WbRecord scanToProcess(Long recordId, Integer deviceId);

    /**
     * 维保任务提交
     *
     * @param wbRecord
     * @return
     */
    boolean taskSubmit(WbRecord wbRecord);

    /**
     * 查询维保审批列表
     *
     * @param fo
     * @return
     */
    List<ApproveDto> getApproveList(ApproveListFo fo);

    /**
     * 查询维保审批详情
     * @param recordId
     * @return
     */
    WbRecord getApproveDetail(Long recordId);

    /**
     * 维保任务临时提交
     * @param wbRecord
     * @return
     */
    boolean taskSubmitTemp(WbRecord wbRecord);
}